package tui;
import controller.*;
import model.*;
public class MainMenuUI
{
    private InputReader reader= new InputReader();
    private String input;
    public MainMenuUI()
    {
    
    
        boolean finished = false;

        printWelcome();
        String input=reader.getInput().trim().toLowerCase();
        switch(input)
        {case "1":
            System.out.print('\u000C');
            staff();
            input=reader.getInput().trim().toLowerCase(); 
            break;
         case "2":
            System.out.print('\u000C');
            customer();
            input=reader.getInput().trim().toLowerCase();
            break;
         case "3":
            System.out.print('\u000C');
            order();
            input=reader.getInput().trim().toLowerCase();
            break;
          case "4":
            System.out.print('\u000C');
            product();
            input=reader.getInput().trim().toLowerCase();
            break;
          default:System.out.print("Guday");
          
        }  
        printGoodbye();
    }
    
    public void printWelcome()
    {
        System.out.println("___________________________________");
        System.out.println("  Welcome to the DIY system ");
        System.out.println(" How may i help you?");
        System.out.println("         *****Main Menu*****  ");
        System.out.println("1. Staff");
        System.out.println("2. Customer ");
        System.out.println("3. Order");
        System.out.println("4. Products");
        System.out.println("____________________________________");
         
        
    }
    
    public void printGoodbye()
    {
        System.out.println("Have a pleasant Day!");
    }
    
    public void staff()
    { System.out.println("___________________________________");
      System.out.println("1. Add staff");
      System.out.println("2. Update staff");
      System.out.println("3. Remove staff");
      System.out.println("4. Find staff");
      String input=reader.getInput().trim().toLowerCase();
      switch(input){
      case "1": addStaff();
    }
    }
    public void customer()
    { System.out.println("___________________________________");
      System.out.println("1. Add customer");
      System.out.println("2. Update customer");
      System.out.println("3. Remove customer");
      System.out.println("4. Find customer");
    }
    public void order()
    { System.out.println("___________________________________");
      System.out.println("1. Add order");
      System.out.println("2. Find order");
      System.out.println("3. Remove order");
      String input=reader.getInput().trim().toLowerCase();
      switch(input){
          case "1": addOrder();}
    }
     public void product()
    { System.out.println("___________________________________");
      System.out.println("1. Add product");
      System.out.println("2. Find product");
      System.out.println("3. Remove product");
    }
    public void addStaff()
    {  String name=reader.getInput("Name: ");
       String phone=reader.getInput("Phone ");
       String cpr=reader.getInput("CPR: ");
       String email=reader.getInput("Email ");
       String address=reader.getInput("Address ");
       String type=reader.getInput("Type: ");
       String workplace=reader.getInput("Workplace ");
       StaffController staffController=new StaffController();
       
    }
    public void addOrder()
    {
    String number=reader.getInput("Order number: ");
    String date=reader.getInput("Shipping date: ");
    String state=reader.getInput("State: ");
    Order o = new Order(number,date,state);
    }
}
